package br.unesp.demac.ccn2007.aula6.ex1_EscritaBytes;

import java.io.*;

public class EscritaBytes {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		DataOutputStream dos = null;
		try {
			dos = new DataOutputStream(new FileOutputStream("C://workspace//LCP//exercicios//src//br//unesp//demac//ccn2007//aula6//test.txt"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			System.exit(-1);
		}
		
		for(int i=0; i<10; i++){
			try {
				dos.writeInt(i);
				double aux = Math.random();
				dos.writeDouble(aux);
				System.out.println("#" + i + " : " + aux);
			} catch (IOException e) {
				e.printStackTrace();
			}
			
			
		}

	}

}
